package com.bawei.module_classify.mvp;

import com.bawei.module_classify.R;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * @author : zhiyu
 * @date : 2021/12/15
 * @content :
 */
public class GoodsAdapter extends BaseQuickAdapter<Data, BaseViewHolder> {
    public GoodsAdapter(@Nullable List<Data> data) {
        super(R.layout.item_good, data);
//        addChildClickViewIds(R.id.tv_goods);




    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, Data data) {
//        String category_name = data.getCategory_name().toString();

//        String substring = category_name.substring(0, category_name.indexOf("/"));





        baseViewHolder.setText(R.id.tv_good, data.getCategory_name());
    }
}
